[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
bcd Binary Coded Decimal Type
Turbo C++ includes two new data classes -- complex and bcd. The bcd
class is for binary coded decimal numbers (numbers stored internally
as decimal -- one decimal digit per four bits -- usually to avoid
roundoff error). This declares a bcd number called my_bcd with a
value of 10.59:
bcd my_bcd(10.59);
The complex type is for complex numbers (numbers with a real and
imaginary part, the imaginary part being some multiple of the square
root of -1). This declares a complex number called my_complex with
real part 10.59 and imaginary part 5.33:
complex my_complex(10.59, 5.33);
-------------------------------- Example ---------------------------------
bcd this_number_is_bcd(51.7);
See Also:
complex
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson